<?php

/**
 * Resource form.
 *
 * @package    mysmartmanager
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class ResourceForm extends BaseResourceForm
{
  public function configure()
  {
    unset($this['resourceid'], $this['loginuserid']);
	$currentUser = sfContext::getInstance()->getUser();
	if (!$currentUser->getGuardUser()->hasGroup('manager') or $currentUser->getGuardUser()->getResource()->getResourceid() == $currentUser->getAttribute('requestedResourceId'))
	{
	  unset($this['rate'], $this['availability']);
	}
  }
}
